<form class="tableform" method="post" action="index.php?app=b2c&ctl=admin_member&act=sms_queue" id='messenger-sms-form' >
    <{if $noMobile}>
    <div class='division'>
        <div class='error'>
            <h4 style="border:none">以下<{$noMobile|@count}>位会员由于没有填写手机短信联系方式，将无法收到信息。</h4>
            <div>
            <{foreach from=$noMobile item=item name=nm}>
                <{$item.login_account}>，
            <{/foreach}>
            </div>
        </div>
    </div>
    <{/if}>
    <h4><{t}>允许回复<{/t}></h4>
    <div class='division'>
        <{input type="bool" name="use_reply" value='false' style="margin:10px;"}>
        <span class='notice-inline'>会员可回复此短信；查看回复，请登录短信平台。</span>
    </div>
    <h4><{t}>信息内容<{/t}></h4>( 不能含有成对的【】)
    <div class="division messager-main">
        <input type="hidden" id="setSmsSignLen" value="<{$setSmsSignLen}>" />
        <{input type="textarea" style=" width:91%;" rows="10" name="content" vtype="required" onkeyup="javascript:this.getNext('.notice-word').getElement('span').set('html',this.value.length+parseInt($('setSmsSignLen').getValue()));"}>
        <div class='notice-word' style=" width:100%;resize: none;">已输入<span><{$setSmsSignLen}></span>个字符<label class="red">(已包含短信签名以及退订字样)</label>
            <span style='float:right;'>67字/条;如超过，将累计条数</span>
        </div>
        <div class="notice" style="margin-top:8px;">
            <{t}>注意事项<{/t}><br>
            <{t}>1.短信为67字/条；如超过，则会被拆为几条进行发送<{/t}><br>
            <{t}>2.短信内容当中，如果有短链接，链接末尾记得打个空格。<{/t}><br>
            <{t}>3.短信内容会自动带上“退订回N”以及“短信签名”字样，不需要您手动输入<{/t}><br>
            <{t}>4.短信内容中不能输入【】符号<{/t}><br>
            <{t}>5.发送短信，需要提交正常的短信内容，不能够有‘测试、test’以及错字符、需提交正规的短信内容<{/t}><br>
            <{t}>6.短信有疑问请咨询QQ：280630068   短信群：199066377<{/t}>
        </div>
    </div>
    <div class="table-action">
        <{button label=$___b2c="发送"|t:'b2c' type="submit" id="sms-form-submit"}>
    </div>
    <input type="hidden" name="mobile_number" value=<{$mobile_number}> />
</form>
<script>
(function(){
    if(Browser.ie6)$E('#messenger-sms-form input[name=title]').focus();
    var _form = $('messenger-sms-form');
    var btn =$('sms-form-submit');
    //var finder = finderGroup['<{$env.get.finder_id}>'];
    _form.store('target',{
        onRequest:function() {
        //btn.set('disabled', true);
        },
        onComplete:function(){
        },
        onSuccess:function(response){
            var hash_res_obj = JSON.decode(response);
            if (hash_res_obj.success != undefined && hash_res_obj.success != ""){
                try{
                var _dialogIns = btn.getParent('.dialog').retrieve('instance');
                }catch(e){}
                if(_dialogIns){
                    _dialogIns.close();
                    //finder.refresh.delay(400,finder);
                }
            }else{
            //alert(hash_res_obj.error);
            }
        }
    });
    /*
    btn.addEvent('click',function(){
    _form.fireEvent('submit',{stop:$empty});
    });
    */
})();
</script>
